package com.chinasoft.movies.controller;

import com.chinasoft.movies.pojo.GenreTopByVote;
import com.chinasoft.movies.service.GenreTopByVoteService;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Log4j2
@CrossOrigin
public class GenreTopByVoteController {
    @Autowired
    GenreTopByVoteService genre_topByVoteService;


    @GetMapping(("/film/queryAll"))
    public List<GenreTopByVote> queryAll()
    {
        return genre_topByVoteService.getAllGenre_top_by_vote();
    }


}
